using ApprovalTests.Reporters;
using Microsoft.SmallBasic.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace SmallBasicFun.Tests
{
	[TestClass]
	
	public class ShapeMakerTest
	{
		[TestMethod]
		public void TestCenterShape()
		{
			ProgramWindow.SetBackgroundColor(Colors.White);
			ShapeMaker.SetColorForNextShape(Colors.Yellow);
			ShapeMaker.SetOutlineColorForNextShape(Colors.Red);
			Primitive c = ShapeMaker.CreateCircle(50);
			ShapeMaker.CenterShapeAt(c, 0, 50);
			ApprovalHelper.ApproveProgramWindow();
		}

		[TestMethod]
		public void TestCreateShape()
		{
			ProgramWindow.SetBackgroundColor(Colors.White);
			ShapeMaker.SetColorForNextShape(Colors.Blue);
			ShapeMaker.SetOutlineColorForNextShape(Colors.Orange);
			Primitive c = ShapeMaker.CreateCircle(50);
			ApprovalHelper.ApproveProgramWindow();
		}
		[TestMethod]
		public void TestRemoveShape()
		{
			var circle = ShapeMaker.CreateCircle(20);
			ShapeMaker.CenterShapeAt(circle,100,100);
			ShapeMaker.RemoveShape(circle);
			ApprovalHelper.ApproveProgramWindow();
		}
		[TestMethod]
		public void TestTransparency()
		{
			ShapeMaker.RestoreDefaults();
			ShapeMaker.SetColorForNextShape(Colors.Blue);
			var circle = ShapeMaker.CreateCircle(20);
			ShapeMaker.CenterShapeAt(circle,100,100);
			ShapeMaker.SetOpacity(circle, 50);
			ApprovalHelper.ApproveProgramWindow();
		}
	}
}